package com.test.service.zone;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.test.entity.zone.School;
import com.test.mapper.zone.SchoolMapper;

@Service("schoolService")
public class SchoolService {
	
	@Autowired
	private SchoolMapper schoolMapper;
	
	/**
	 * 判断是否有学校？
	 * @return
	 */
	@Transactional
	public boolean hasSchool(){
		List<School> list = schoolMapper.getAllSchool();
		if(list.size() <= 0){
			return false;
		}else{
			return true;
		}
	}
}
